<?php $this->load->view('layout/header'); ?>
    <div id="container">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_op">
            <tr>
                <td>
                    操作选项：
                    <a href="<?php echo b_url('wechat/menu_add')?>">添加主菜单</a>
                    <a onclick="javascript:return checkEdit(this);" name="menu_id" href="javascript:;)" src="<?php echo b_url('wechat/menu_add/');?>">修改菜单</a>
                    <a onclick="javascript:return checkDel(this);" name="menu_id" href="javascript:;)" src=<?php echo b_url('wechat/delete_info/menu/menu_id/weixinmenu/')?>>删除菜单</a>
                    <a href="<?php echo b_url('wechat/menu_synoc')?>">同步菜单</a>
                </td>
            </tr>
        </table>
        <!--操作选项结束-->
        <!--列表开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list" id="TbList">
            <tr class="table_list_title">
                <td style="width: 2%">
                    <input type="checkbox" name="checkbox" value="checkbox" onclick="javascript:checkAll(this,'menu_id')" />
                </td>
                <td style="width: 6%" onclick="javascript:GoTo('?OrderKey=SysLimitID&AscDesc=desc&txtLimitName=&txtLimitValue=&txtComment=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    菜单标题
                </td>
                <td style="width: 4%" onclick="javascript:GoTo('?OrderKey=LimitName&AscDesc=desc&txtLimitName=&txtLimitValue=&txtComment=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    菜单响应动作
                </td>
                <td style="width: 15%" onclick="javascript:GoTo('?OrderKey=SysLimitID&AscDesc=desc&txtLimitName=&txtLimitValue=&txtComment=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    链接地址
                </td>
                <td style="width: 6%" onclick="javascript:GoTo('?OrderKey=SysLimitID&AscDesc=desc&txtLimitName=&txtLimitValue=&txtComment=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    菜单key值
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtLimitName=&txtLimitValue=&txtComment=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    操作
                </td>
            </tr>
            <?php foreach($info as $k=>$v) : ?>
                <tr class="table_list_row_normal">
                    <td style="width: 2%">
                        <input name="menu_id" type="checkbox"  value="<?php echo $v['menu_id']?>" />
                    </td>
                    <td style="width: 10%">
                        <?php echo $v['menu_title']?>
                    </td>
                    <td style="width: 10%">
                        <?php echo $v['menu_action']?>
                    </td>
                    <td style="width: 10%">
                        <?php echo $v['menu_url']?>
                    </td>
                    <td style="width: 10%">
                        <?php echo $v['menu_key']?>
                    </td>
                    <td style="width: 10%">
                        <?php if($v['menu_parent'] == 0){ ?>
                            <a href="<?php echo b_url('wechat/menu_add_son/').$v['menu_id']?>">添加子菜单</a>
                        <?php } ?>
                    </td>
                </tr>
                <?php if(!empty($v['son'])){ ?>
                    <?php foreach($v['son'] as $key=>$val) : ?>
                        <tr class="table_list_row_normal">
                            <td style="width: 2%">
                                <input name="menu_id" type="checkbox"  value="<?php echo $val['menu_id']?>" />
                            </td>
                            <td style="width: 10%">
                                &nbsp;&nbsp;&nbsp;&nbsp;<?php echo $val['menu_title']?>
                            </td>
                            <td style="width: 10%">
                                <?php echo $val['menu_action']?>
                            </td>
                            <td style="width: 10%">
                                <?php echo $val['menu_url']?>
                            </td>
                            <td style="width: 10%">
                                <?php echo $val['menu_key']?>
                            </td>
                            <td style="width: 10%">
                                <?php if($val['menu_parent'] == 0){ ?>
                                    <a href="<?php echo b_url('wechat/menu_add_son/').$val['menu_id']?>">添加子菜单</a>
                                <?php } ?>
                            </td>
                        </tr>

                        <?php endforeach ; ?>
                <?php } ?>
            <?php endforeach ; ?>
        </table>
        <!--列表结束-->
    </div>
    <script src="/static/bk/js/table.js" type="text/javascript"></script>
<?php $this->load->view('layout/footer'); ?>